package com.dibang.app.mvp.util;

import android.content.Context;
import android.text.TextUtils;
import android.widget.Toast;

/**
 * Created by wxl on 2019/7/2.
 */

public class Tu {

    private static Tu tu;

    private static Context context;

    public static void initialize(Context context) {
        Tu.context = context;
    }


    public static Tu get() {
        synchronized (Tu.class) {
            if (tu == null) {
                tu = new Tu();
            }
        }
        return tu;
    }


    public void tu(String text) {
        try {
            if (!TextUtils.isEmpty(text)) {
                Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
            }
        } catch (Exception e) {

        }
    }


    public void ta(String text) {
        try {
            if (!TextUtils.isEmpty(text)) {
                Toast.makeText(context, text, Toast.LENGTH_LONG).show();
            }
        } catch (Exception e) {

        }
    }
}
